﻿using System;


namespace Messenia.Data.Models {
    [Serializable]
     class GroupResource {
     virtual  public HumanResources Resources {
            get;
            set;
        }
       virtual public Groups Groups {
            get;
            set;
        }
        public override int GetHashCode() {
            int hash = 13;
            hash = (hash * 7) ^ Groups.GetHashCode();
            hash = (hash * 7) ^ Resources.GetHashCode();
            return hash;
        }

        public override bool Equals(object obj) {
            if ((obj as GroupResource) != null) {
                if (this.Resources.Id == (obj as GroupResource).Resources.Id) {
                    if (this.Groups.Id == (obj as GroupResource).Groups.Id) {
                        return true;
                    }
                    return false;
                }
                return false;

            }
            return false;
        }
    }
}
